home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / pctchnqs / 1991 / number2 / charactr.cpp < prev    next >
C/C++ Source or Header  |  1991-03-06  |  1KB  |  44 lines

  1. //-------------------------------------------------------------//
  2. //              Autumn Hill Software Incorporated              //
  3. //          Copyright (c) 1991 -- All Rights Reserved          //
  4. //-------------------------------------------------------------//
  5. // File:   Font.Cpp                                            //
  6. // Desc:   Methods for Font and Character Classes              //
  7. // Vers:   1.0                                                 //
  8. // Date:   Feb, 1991                                           //
  9. //-------------------------------------------------------------//
  10.  
  11. #include "string.h"
  12. #include "charactr.hpp"
  13.  
  14. //........ default constructor
  15.  
  16. Character::Character( ) : BitMask( )
  17. {
  18.      left_ofs = 0;
  19.      top_ofs  = 0;
  20.      delta_x  = 0;
  21. }
  22.  
  23. //........ constructor using specified components
  24.  
  25. Character::Character( int w, int h, char *m) : BitMask( w, h, m )
  26. {
  27.      left_ofs = 0;
  28.      top_ofs  = h;
  29.      delta_x  = w;
  30. }
  31.  
  32. //........ default destructor (implied call to ~BitMask())
  33.  
  34. Character::~Character( )
  35. {
  36. }
  37.  
  38. //........ draw character
  39.  
  40. void Character::drawch( int x, int y, int clr )
  41. {
  42.      draw( x+left_ofs, y+top_ofs, clr );
  43. }
  44.